<ui:composition template="/template.xhtml"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets">

    <ui:define name="title">
        User Registration
    </ui:define>
    <ui:define name="content">
        <h1>User Registration</h1>
		<f:view>
			<h:form>

				<p>Enter your first name:</p>
				<h:inputText value="#{ProfileBean.firstName}"
							 id="firstNameTextField" required="true"/>
				<h:message for="firstNameTextField"/>

				<p>Choose your middle name:</p>
				<h:inputText
						value="#{ProfileBean.middleName}"
						id="middleNameTextField"
						required="false"/>
				<h:message for="middleNameTextField" />
				<p>Choose your last name:</p>
				<h:inputText
						value="#{ProfileBean.lastName}"
						id="lastNameTextField"
						required="true"/>
				<h:message for="lastNameTextField" />
				<!--
						   <p>Enter the password:
						   <h:inputSecret
							   value="#{UserBean.password}"
							   id="passwordTextField"
							   required="true"/>
						   <h:message for="passwordTextField" />

						   <p>Enter your birthday:
						   <h:inputText
							   value="#{UserBean.birthday}"
							   id="birthdayTextField"
							   required="true">
						   <f:convertDateTime pattern="MMM-dd-yyyy" />
						   </h:inputText> (MMM-dd-yyyy)
						   <h:message for="birthdayTextField" />
			   -->
				<p>Enter your phone-number:</p>
				<h:inputText
						value="#{ProfileBean.phoneNumber}"
						id="phoneNumberTextField"
						required="true">
					<f:validator validatorId="PhoneNumberValidator" />
				</h:inputText>
				<h:message for="phoneNumberTextField"/>

				<h:commandButton value="Submit Values" action="#{ProfileBean.save()}"/>

			</h:form>
		</f:view>
    </ui:define>
</ui:composition>
